package com.ericsson.enap.modules.cdr.job;

import com.ericsson.common.quartz.job.MainJob;
import com.ericsson.common.quartz.job.ManualQuartzJob;
import com.ericsson.common.quartz.service.QuartzTableManager;
import com.ericsson.common.util.LogFileName;
import com.ericsson.common.util.LoggerUtils;
import com.ericsson.enap.modules.cdr.task.EnipSplitFileTask;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 文件切割任务，目前支持IMS话单，5GC话单，5GC ebm
 * @author zhuguangrui
 */
@Component
public class EnipSplitFileJob implements MainJob {

    public static final String JOB_NAME = "EnipSplitFileJob";
    private final Logger log = LoggerUtils.Logger(LogFileName.EnipSplitFileJob);
    @Autowired
    private QuartzTableManager quartzTableManager;
    @Autowired
    private EnipSplitFileTask enipSplitFileTask;

    @Override
    public void doTask() {
        log.info("===== do VgcCdrSplitJob start =====");
        quartzTableManager.addManualTaskJob(
                JOB_NAME,JOB_NAME, JOB_NAME,JOB_NAME,
                ManualQuartzJob.class,"0 2/5 * * * ?", enipSplitFileTask);
    }
}
